//-------------------------------------------------------------------
//	Copyright (c) 2010-2012 Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_ZIP_FILE_SYSTEM_H
#define _UX_ZIP_FILE_SYSTEM_H

#include "IVirtualFileSys.h"

namespace Engine
{
namespace FileSystem
{

	//
	// ZIP File System
	//

	class _EXPORT_ CZipFileSystem : public IVirtualFileSys
	{
	public:
		CZipFileSystem();
		virtual ~CZipFileSystem();

		// IVirtualFileSys //
		virtual bool IsSupported(const string &sArchiveName);
		virtual bool IsExist(const string &sArchiveName, const string &sFileName);
		virtual bool OpenFile(const string &sArchiveName, const string &sFileName, IFilePtr &pFile, e_file_open_flags::type eFlags);
		virtual bool OpenCryptFile(const string &sArchiveName, const string &sFileName, const char *pPassword, IFilePtr &pFile, e_file_open_flags::type eFlags);

		virtual e_file::type GetType()	const	{ return e_file::ZIP; }

		// CEngBaseObject //
		virtual void Release();
	};

//-------------------------------------------------------------------

}	// FileSystem
}	// Engine

#endif	// _UX_ZIP_FILE_SYSTEM_H